package com.icart.repositories;


import com.icart.entities.CuCustinfoEntity;
import org.springframework.context.annotation.Scope;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

@Repository
@Scope("prototype")
public interface CouponRepository extends BaseRepository<CuCustinfoEntity,Integer> {
    @Transactional
    @Query(nativeQuery = true,value = "update cu_coupon set stat=1 where cpid=?1")
    @Modifying(clearAutomatically = true)
    Integer update(Long cpid);
}

